//
//  RootViewController.h
//  RunSketch
//
//  Created by Brian Hinch on 7/8/08.
//  Copyright Tellart 2008. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kUserDefaultsKey_SketchServerName				@"SketchServerName"
#define kUserDefaultsKey_ServerFlowControlEnabled		@"ServerFlowControlEnabled"
#define kUserDefaultsKey_IOPackBoostEnabled				@"IOPackBoostEnabled"
#define kUserDefaultsKey_LastShutdownStatus				@"LastShutdownStatus"

@class MainViewController;
@class FlipsideViewController;
@class SketchUpdateController;


@interface RootViewController : UIViewController {

	IBOutlet UIButton *infoButton;
	MainViewController *mainViewController;
	FlipsideViewController *flipsideViewController;
	UINavigationBar *flipsideNavigationBar;

    SketchUpdateController *sketchUpdater;
}

@property (nonatomic, retain) UIButton *infoButton;
@property (nonatomic, retain) MainViewController *mainViewController;
@property (nonatomic, retain) UINavigationBar *flipsideNavigationBar;
@property (nonatomic, retain) FlipsideViewController *flipsideViewController;

- (IBAction)toggleView;
- (IBAction)updateSketchFromServer;
- (IBAction)cancelSketchUpdate;

-(void) didFailWithConnectionError: (SketchUpdateController *)c;
-(void) didFailWithCommunicationError: (SketchUpdateController *)c:(NSString *)msg;
-(void) didLoadCatalog: (SketchUpdateController *)c;
-(void) didFailWithCatalogParserError: (SketchUpdateController *)c: (NSError *)err;
-(void) madeProgress: (SketchUpdateController *)c: (int)bytesLoaded: (int)bytesTotal;
-(void) didSucceed: (SketchUpdateController *)c;
-(void) didStop: (SketchUpdateController *)c;
- (void)loadUserPreferences;
- (void)storeUserPreferences;

@end
